/**
 * Copyright:Copyright(c)2014-2017
 * Company:厦门市易致达物联网科技有限公司
 * @version 1.0
 */
package shop.services.manage.proxy.dao.impl;

import java.util.List;

import shop.core.common.dao.BaseDao;
import shop.core.common.dao.page.PagerModel;
import shop.services.manage.proxy.bean.Proxy;
import shop.services.manage.proxy.dao.ProxyDao;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @类名称：ProxyDaoImpl
 * @创建人：wzl
 * @创建时间：2018-05-24 下午14:53:53  
 * @版本号：1.0
 * @描述：
 */
@Repository("proxyDaoManage")
public class ProxyDaoImpl  implements ProxyDao {

    @Resource
    private BaseDao dao;

    public void setDao(BaseDao dao) {
        this.dao = dao;
    }

    public PagerModel selectPageList(Proxy e) {
        return dao.selectPageList("manage.proxy.selectPageList","manage.proxy.selectPageCount", e);
    }

    public List selectList(Proxy e) {
        return dao.selectList("manage.proxy.selectList", e);
    }

    public Proxy selectOne(Proxy e) {
        return (Proxy) dao.selectOne("manage.proxy.selectOne", e);
    }

    public int delete(Proxy e) {
        return dao.delete("manage.proxy.delete", e);
    }

    public int update(Proxy e) {
        return dao.update("manage.proxy.update", e);
    }

    public int deletes(String[] ids) {
        Proxy e = new Proxy();
        for (int i = 0; i < ids.length; i++) {
            e.setId(ids[i]);
            delete(e);
        }
        return 0;
    }

    public int insert(Proxy e) {
        return dao.insert("manage.proxy.insert", e);
    }

    public int deleteById(int id) {
        return dao.delete("manage.proxy.deleteById", id);
    }

    @Override
    public Proxy selectById(String id) {
        return (Proxy) dao.selectOne("manage.proxy.selectById", id);
    }

    @Override
    public PagerModel selectProxyPage(Proxy proxy) {
        return dao.selectPageList("manage.proxy.selectProxyPage","manage.proxy.selectProxyPageCount", proxy);
    }

    @Override
    public PagerModel selectCentralProxyPage(Proxy proxy) {
        return dao.selectPageList("manage.proxy.selectCentralProxyPage","manage.proxy.selectCentralProxyPageCount", proxy);
    }

    @Override
    public PagerModel selectCollectProxyPage(Proxy proxy) {
        return dao.selectPageList("manage.proxy.selectCollectProxyPage","manage.proxy.selectCollectProxyPageCount", proxy);
    }

    @Override
    public PagerModel selectExperimentProxyPage(Proxy proxy) {
        return dao.selectPageList("manage.proxy.selectExperimentProxyPage","manage.proxy.selectExperimentProxyPageCount", proxy);
    }

    @Override
    public PagerModel selectFirstReportProxyPage(Proxy proxy) {
        return dao.selectPageList("manage.proxy.selectFirstReportProxyPage","manage.proxy.selectFirstReportProxyPageCount", proxy);
    }

    @Override
    public PagerModel selectSecondReportProxyPage(Proxy proxy) {
        return dao.selectPageList("manage.proxy.selectSecondReportProxyPage","manage.proxy.selectSecondReportProxyPageCount", proxy);
    }

    @Override
    public PagerModel selectFinanceProxyPage(Proxy proxy) {
        return dao.selectPageList("manage.proxy.selectFinanceProxyPage","manage.proxy.selectFinanceProxyPageCount", proxy);
    }
}

